<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width"/>
<title>common</title>
<style type="text/css">

    .box1{
        width: 200px;
        height: 200px;
        background:red;
    }
    .box2{
        width: 200px;
        height: 200px;
        background:yellow;
    }
    .box3{
        width: 200px;
        height: 200px;
        background: green;
    }

    #dis{
      display: none;
    }
</style>
</head>
<body>

<div class="box1">我是box1</div>
<br />
<br />
<div class="box2">我是box2</div>
<br />
<br />
<div class="box3">
<p>111</p>
<p>222</p>
<p>333</p>
</div>

<div id="dis">隐藏文件</div>

<script type='text/javascript' src='../../js/zepto.js'></script>
<script type='text/javascript' src='../../js/touch.js'></script>
<script type='text/javascript'>
  $(function () {
    let arr = [3,44,1]
    $.each(arr,function (index,item) {
      console.log(index+':'+item)
    })

    //append方法
    $('.box1').on('touchstart',function () {
      $(this).append('<p>新增的标签</p>')
    })

    //find方法
    $('.box3').on('touchstart',function () {
      $(this).find('p').css('background','red')
    })

    //show方法
    $('.box2').on('touchstart',function () {
      $('#dis').show()
    })
  })

</script>
</body>
</html>

